<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>
			<div class="blue-text16" style="margin: 0px 0px 0px 0px">
				<s:text name="advertiseReport.advertiseReport"></s:text>
			</div>
			<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
			<div style="margin: 0px 0px 12px 0px">
				<display:table name="bannerCampaignList" cellpadding="1"
					style="width: 100%;" cellspacing="1" requestURI="" id="row"
					class="common-text" pagesize="5">
					<display:column headerClass="grid-header-bg grid-header-text"
						class="grid-bg common-text" titleKey="advertiseReport.campaign" property="campaign" />
					<display:column headerClass="grid-header-bg grid-header-text"
						class="grid-bg common-text" titleKey="advertiseReport.account" property="user.userId" />
					<display:column headerClass="grid-header-bg grid-header-text"
						class="grid-bg common-text" titleKey="advertiseReport.clicks" property="clicks" />
					<display:column headerClass="grid-header-bg grid-header-text"
						class="grid-bg common-text" titleKey="advertiseReport.views" property="views" />
					<display:column headerClass="grid-header-bg grid-header-text"
						class="grid-bg common-text" titleKey="advertiseReport.ctr" >
						<s:set name="CTR" value="%{(#attr.row.clicks/#attr.row.views)*100}"  ></s:set>
						<s:property value="#CTR"/>
					</display:column>
					<display:column headerClass="grid-header-bg grid-header-text" style="align: center;"
						class="grid-bg common-text" titleKey="advertiseReport.spent" >
						<s:set name="spent" value="%{#attr.row.maxClicks - #attr.row.clicks}"></s:set>
						<s:property value="#spent"/>
					</display:column>
					<display:column headerClass="grid-header-bg grid-header-text" style="align: center;"
						class="grid-bg common-text" titleKey="advertiseReport.action">
						<table>
							<tr>
								<td id="mddm" valign="top" rowspan="2" class="common-text" align="center">
									<a class="navi-link" href="#"
										onmouseover="mopen('<s:property value="#attr.row.id" />', this, 'navi-link', 'right', <s:property value="#attr.row.id" />)"
										onmouseout="mclosetime()"><s:text name="advertiseReport.select" /> </a>
									<div style="visibility: hidden;"
										id="<s:property value="#attr.row.id" />"
										onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
									<a href="advertiseConfig.htm?id=<s:property value="#attr.row.id" />"><s:text name="advertiseReport.config" /> </a>
										<s:if test="%{#attr.row.active == false}">
											<a href="modifyBannerCampaign.htm?id=<s:property value="#attr.row.id" />&param=active"><s:text name="advertiseReport.active" /></a>
										</s:if>
										<s:else>
											<a href="modifyBannerCampaign.htm?id=<s:property value="#attr.row.id" />&param=inactive"><s:text name="advertiseReport.inactive" /></a>
										</s:else>
										<a href="javascript: wantToDeleteWithURL('modifyBannerCampaign.htm?id=<s:property value="#attr.row.id" />?param=delete','Do you want to delete this Campaign?')"><s:text name="advertiseReport.delete"/> </a>
										<!-- <a href="">Stats</a> -->
									</div>
								</td>
							</tr>
						</table>
					</display:column>
				</display:table>
			</div>
		</td>
	</tr>
</table>